#ifndef XColorMap_First
#define XColorMap_First
#ifdef __GNUG__
#pragma interface
#endif

#include "X11.h"
#include "WindowColorMap.h"

//---- XColorIndexMapper -------------------------------------------------------

class XColorIndexMapper : public WindowIndexMapper {
public:
	XColormap cmap;
	XColor xc[256];

public:
	XColorIndexMapper(XColormap cm, bool readwrite= TRUE);
	XColorIndexMapper(XColorIndexMapper *from);
	u_long DevRGB2Index2(RGB *rgb);
	u_long DevAllocateAndSetCell(long id, RGB *rgb, WindowPort*);
	void DevInstall(Port *port);
	WindowColorMap *DevMakeCopy(WindowColorMap *from);
};

#endif
